import React, { memo, useRef } from 'react'

const App = memo(() => {
  const titleRef = useRef()

  function showDOM() {
    console.log(titleRef.current);
  }
  return (
    <div>
      <div ref={titleRef}>Hello World</div>
      <button onClick={showDOM}>查看DOM</button>
    </div>
  )
})

export default App